]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Initialize GStreamer from shell_recorder_init()
authorOwen W. Taylor <otaylor@fishsoup.net>
Thu, 6 Aug 2009 19:07:55 +0000 (15:07 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Thu, 6 Aug 2009 19:19:04 +0000 (15:19 -0400)
Move the GStreamer initialization from the Javascript code into
shell_recorder_init(). This avoids a dependency on the GStreamer
introspection information and will make it easier to drop the
gir-repository module dependency.

js/ui/main.js
src/shell-recorder.c

index d22d52393458ad7027489eb2acd5d059528b3abc..4e2000736d6bef478c0401358e8436887e0d048f 100644 (file)
@@ -67,11 +67,6 @@ function start() {
     
     global.screen.connect('toggle-recording', function() {
         if (recorder == null) {
-            // We have to initialize GStreamer first. This isn't done
-            // inside ShellRecorder to make it usable inside projects
-            // with other usage of GStreamer.
-            let Gst = imports.gi.Gst;
-            Gst.init(null, null);
             recorder = new Shell.Recorder({ stage: global.stage });
         }
 
index 134c0e550220d98fdafa19589ce2bc658d99c019..2ff7d5a8454e7ca4f40b34a42de0695c68c7f2ac 100644 (file)
@@ -232,6 +232,9 @@ get_memory_target (void)
 static void
 shell_recorder_init (ShellRecorder *recorder)
 {
+  /* Calling gst_init() is a no-op if GStreamer was previously initialized */
+  gst_init (NULL, NULL);
+
   shell_recorder_src_register ();
 
   recorder->recording_icon = create_recording_icon ();